package com.tencent.web.controller;

import com.tencent.service.showMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.Date;

/**
 * @author: @date: 2022/8/11 21:03
 * @description:
 */
@RestController
@RequestMapping("/showmember")
public class showMemberController {
    @Autowired
    private showMemberService showMemberService;

    @RequestMapping("/showAllMember")
    public int showAllMember(){

        int i = showMemberService.showAllMember();
        return i;
    }

    @RequestMapping("/showOrderNum")
    public int showOrderNum( long time1, long time2){
        System.out.println(time1+","+time2);
//        int i = showMemberService.showOrderNum(time1, time2);
        int i = showMemberService.showOrderNum(new Date(time1), new Date(time2));
        return i;
    }
}